DataSource for Entity Framework in WPF
C1.WPF.LiveLinq Namespace / WpfExtensions Class / AsLive Method / AsLive<T>(INotifyCollectionChanged) Method
The type of the elements in the view.
The System.Collections.Specialized.INotifyCollectionChanged data source to expose as a view.

In This Topic
    AsLive<T>(INotifyCollectionChanged) Method
    In This Topic
    Creates a view based on the specified System.Collections.Specialized.INotifyCollectionChanged data source.
    Syntax
    'Declaration
     
    Public Overloads Shared Function AsLive(Of T)( _
       ByVal source As INotifyCollectionChanged _
    ) As View(Of T)
    public static View<T> AsLive<T>( 
       INotifyCollectionChanged source
    )

    Parameters

    source
    The System.Collections.Specialized.INotifyCollectionChanged data source to expose as a view.

    Type Parameters

    T
    The type of the elements in the view.

    Return Value

    A view that contains the same elements as the System.Collections.Specialized.INotifyCollectionChanged data source.
    Remarks

    Use this method to build views from existing data sources implementing System.Collections.Specialized.INotifyCollectionChanged. The element type of this data source must implement System.ComponentModel.INotifyPropertyChanged, see Using the built-in collection class IndexedCollection(T) (LiveLinq to Objects)|tag=Using_the_built_in_collection_class_IndexedCollectionT_LiveLinq_to_Objects.

    The resulting view may have its elements ordered differently than they are ordered in the source. Correspondingly, views built on this resulting view (for example, if you filter it with Where) will not preserve the source order either. If you need to preserve the source order, consider using the other AsLive overload where you can specify to what extent you need the order to be preserved.

    See Also